/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
/*
 * leafget
 * Copyright (C) xinliGG 2008 <xinliGG@gmail.com>
 * 
 * leafget is free software: you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * leafget is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License along
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _HTTP_H_
#define _HTTP_H_

#include "leafget.h"
#include "socket.h"
 
class Http: private Socket 
{
public:
	Http();
	virtual ~Http(){};
			
		/* initial functions */
	
	const bool        configure         ( std::string host, int port );
	
		/* set functions*/
		
	const bool        set_stop          ( void );
	const bool        set_speedLimit    ( const int & );
	
		/* get functions*/
	
	const std::string get_head          ( const std::string & );
	const bool        get_file          ( LEAF_TASK_DATA *, const std::string, const std::string, const int, const bool );
	
private:

		/* active functions */

	const bool        active_speedLimit ( const int &, const int &, const int & );
 	
 	bool start;

	int speedLimit;
};

#endif // _HTTP_H_
